<h1>Listing Beers</h1>
<p><?= link_to('New Beer', array('action' => 'create')); ?></p>
<? if (count($this->beers) == 0) : ?>
    <p>No data.</p>
<? else : ?>
    <table>
        <tr>
            <th>Nom</th>
            <th>Slug</th>
            <th>Brasserie</th>
            <th>Degree alcool</th>
            <th>Couleur</th>
            <th>Gout</th>
            <th>Fermentation</th>
            <th>Description</th>
            <th>Created on</th>
            <th>Updated on</th>
            </tr>
        <? foreach ($this->beers as $beer) : ?>
            <tr>
                <td><?= truncate($beer->nom); ?></td>
                <td><?= truncate($beer->slug); ?></td>
                <td><?= truncate($beer->brasserie); ?></td>
                <td><?= $beer->degree_alcool; ?></td>
                <td><?= truncate($beer->couleur); ?></td>
                <td><?= truncate($beer->gout); ?></td>
                <td><?= truncate($beer->fermentation); ?></td>
                <td><?= truncate($beer->description); ?></td>
                <td><?= $beer->created_on; ?></td>
                <td><?= $beer->updated_on; ?></td>
                <td><?= link_to('View', array('action' => 'view', 'id' => $beer->id)); ?></td>
                <td><?= link_to('Edit', array('action' => 'update', 'id' => $beer->id)); ?></td>
                <td><?= link_to('Delete', array('action' => 'delete', 'id' => $beer->id),
                                         array('confirm' => 'Are you sure ?')); ?></td>
            </tr>
        <? endforeach; ?>
    </table>
<? endif; ?>
<p><?= link_to('New Beer', array('action' => 'create')); ?></p>

